Title Banner


Technical Q&A's


QTMTB 35 - QuickTime Track Clip Effect (1-May-95)


Q There is a section called technically interesting movies and a movie calledTrack Clip on the QuickTime 2.0 developer CD-ROM. The video track of this movie contains a clip. As with the movie clip example, this movie is a good test of applications which import or recompress movies. How did you achieve the "track Clip" effect?

A The call SetMovieClipRgn is a call to specify various clip regions that are actually stored as movie atoms (GetMovieClipRgn will return the clip region from the atomic values). So you could use this call to specify the clip track atoms when creating the movie.

This call is described on pages 2-172 of Inside Macintosh: QuickTime, and clip-track atoms are discussed on pages 4-13 and 4-22. talks about the clip track atoms.

I did a quick test with the Round Movie (part of the #develop #18 article), took this one over to the Windows side, and QTW 2.0.x doesn't seem to honor clip tracks, so I will file a request for change for adding support for clip tracks concerning QTW.

Here's Pascal sample code from TimeBaseSlaveAux.p sample code:

  
 (* Sets the movie clip region in order to display only a piece of it *)
 PROCEDURE SplitMovie(moov: Movie; count: Integer);
 VAR cBox:	Rect;
 	rectRgn: RgnHandle;
 
 BEGIN
 	rectRgn := NewRgn;
 	GetMovieBox(moov, cBox);
 	
 	WITH cBox DO
 		CASE count OF
 			1:BEGIN
 				 right := right DIV 2;
 				bottom := bottom DIV 2;
 			  END;
 			2:BEGIN
 				 left := right DIV 2;
 				bottom := bottom DIV 2;
 			  END;
 			3:BEGIN
 				left := right DIV 2;
 				top := bottom DIV 2;
 			  END;
 			4:BEGIN
 				 right := right DIV 2;
 				top := bottom DIV 2;
 			  END
 		END; (* CASE *)
 	
 	OpenRgn;
 	  FrameRect(cBox);
 	CloseRgn(rectRgn);
 	
 	SetMovieClipRgn(moov, rectRgn);
 	
 	DisposeRgn(rectRgn);
 END;


Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help